/*******************************************************************************************
 *  Repeat.h
 *
 *  Creating and managing Repeat object structures.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/
#include "BulletMLConsts.h"
#include "BulletMLTypes.h"
#include "Action.h"
#include "ActionRef.h"







/*******************************************************************************************
 *  TYPE definitions :
 *******************************************************************************************/

/* The REPEAT object strucuture definition : */
#ifndef _REPEAT_STRUCT_
#define _REPEAT_STRUCT_
typedef struct {

	ObjType		otype;					/* The object's type, as in ...    */
										/* ... the BML type enum.          */

	char		*times;					/* How many times do we have ...   */
										/* ... to repeat the action?       */

	Action		*action;				/* The action to be repeated.      */
	ActionRef	*actionRef;				/* The reference to the action ... */
										/* ... to be repeated.             */

} Repeat;
#endif







/*******************************************************************************************
 *  Function PROTOTYPES :
 *******************************************************************************************/

/* CONSTRUCTOR and DESTRUCTOR : */
Repeat 	*newRepeat(void);				/* Creates an empty Repeat object strucutre. */
void 	freeRepeat(Repeat *r);			/* Destroys a Repeat object structure.       */ 


/* FILLING the Repeat object structure : */
void 	setRepeatTimes(Repeat *r, char *t);
void 	setRepeatAction(Repeat *r, Action *a);
void 	setRepeatActionRef(Repeat *r, ActionRef *ar);
